<template>
	<view>
		<view class="list">
			<view class="list-item" v-for="it in value" :key="it.user_id" @click="showlist(it)">
				<view class="num">{{it.sort}}</view>
				<view class="cell flex-row">
					<image :src="it.head" class="avatar" @click="toIndexOther(it.b_id)"></image>
					<view class="flex-1">
						<view class="text1">
							<view>{{it.nickname}}</view>
						</view>
					</view>
					<view class="text3">
						<!-- <view style="color: #cdcdcd;">{{it.add_time || ''}}</view> -->
						<view>
							带货
							<text>{{it.money || 0}}</text>
							个订单
						</view>
					</view>
				</view>
			</view>
		</view>
		<u-popup :show="listshow" mode="center" :round='20' :closeOnClickOverlay='true' @close="()=>listshow=false">
			<view class="listbg">
				<view class="listitem tit">
					<view class="">商品名称</view>
					<view class="">价格</view>
					<view class="">时间</view>
				</view>
				<scroll-view :scroll-y="true" class="scview" @scrolltolower='stobottom'>
					<view class="listitem">
						<view class="">商品名商品名称商品名称称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商名称商品名称称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商品名商品称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商品名商品名称商品名称称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商名称商品名称称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商品名商品称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商品名商品名称商品名称称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商名称商品名称称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
					<view class="listitem">
						<view class="">商品名商品称</view>
						<view class="">$99888</view>
						<view class="">2020-12-12 20220222002</view>
					</view>
				</scroll-view>

			</view>
		</u-popup>


	</view>
</template>

<script>
	export default {
		props: {
			value: {
				type: Array,
				default: () => []
			},
			info: {
				type: String | Object
			},
			userInfo: {
				type: Object
			}
		},
		data() {
			return {
				list: [],
				page: 1,
				listshow: false,
			}
		},
		methods: {
			showlist() {
				return
				this.listshow = true
				this.page = 1
				this.getTableList()
			},
			toIndexOther(id) {
				uni.navigateTo({
					url: '/pages/index/other?isBackHome=2&shareId=' + id
				})
			},
			stobottom() {
				this.page++
				this.getTableList()
			},

			getTableList() {
				let data = {
					page: 1
				}
				return
				circle_member_list_more(data).then(res => {

					if (this.page == 1) {
						this.list = res.data

					} else {
						if (res.data.length == 0) {
							this.page--

						} else {
							this.list = [...this.list, ...res.data]
						}
					}



				})

			},
		}
	}
</script>

<style lang="scss" scoped>
	.listbg {
		width: 650rpx;
		height: auto;
		background: #FFFFFF;
		border-radius: 20rpx;
		overflow: hidden;
		box-sizing: border-box;
		padding: 0 20rpx;

		.scview {
			max-height: 550rpx;
		}

		.listitem {
			display: flex;
			align-items: center;
			font-size: 24rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #444;

			view {
				text-align: center;
				height: 100rpx;
				display: flex;
				align-items: center;
				justify-content: center;
			}

			view:nth-of-type(1) {
				width: 50%;
				text-overflow: ellipsis;
				white-space: nowrap;
				overflow: hidden;
				justify-content: flex-start;
			}

			view:nth-of-type(2) {
				width: 20%;
			}

			view:nth-of-type(3) {
				width: 30%;

			}
		}

		.tit {
			font-size: 28rpx;
			font-weight: bold;
			border-bottom: 1rpx solid #999;

			view:nth-of-type(1) {
				justify-content: center;
			}
		}

		// <view class="listbg">
		// 	<view class="listitem tit">
		// 		<view class="">商品名称</view>
		// 		<view class="">价格</view>
		// 		<view class="">时间</view>
		// 	</view>
		// 	<view class="listitem">
		// 		<view class="">商品名商品名称商品名称称</view>
		// 		<view class="">$99888</view>
		// 		<view class="">2020-12-12 20220222002</view>
		// 	</view>
	}

	.cell {
		padding: 30rpx;
		border-bottom: 1px solid #f5f5f5;

		.text1 {
			font-size: 30rpx;
			font-weight: bold;
		}

		.text2 {
			font-size: 24rpx;
			color: #999;
			margin: 10rpx 0;
		}

		.text3 {
			font-size: 32rpx;


			&>view {
				margin-top: 10rpx;
				font-family: PingFang;
				font-weight: 500;
				font-size: 30rpx;
				color: #131313;

				text {
					margin: 0 10rpx;
					color: $u-warning;
					font-size: 34rpx;
					font-weight: bold;
				}
			}
		}

		.avatar {
			width: 100rpx;
			height: 100rpx;
			border-radius: 50rpx;
			margin-right: 20rpx;
		}

		.intro {
			display: -webkit-box;
			/* 关键属性 */
			-webkit-box-orient: vertical;
			/* 排列方向 */
			-webkit-line-clamp: 2;
			/* 显示行数 */
			overflow: hidden;
			/* 溢出隐藏 */
			text-overflow: ellipsis;
			/* 省略号 */
			word-break: break-word;
			font-size: 24rpx;
			color: #999;
		}
	}

	.message {
		width: 690rpx;
		margin: 0 auto;
		margin-bottom: 30rpx;

		.message-list {
			width: 100%;
			background: #FFFFFF;
			border-radius: 20rpx;
			box-sizing: border-box;
			padding: 19rpx 16rpx;
			margin-bottom: 24rpx;

			.message-list-header {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-bottom: 50rpx;

				.message-list-header-l {
					display: flex;
					align-items: center;
					font-family: PingFang SC;
					font-weight: 400;
					font-size: 26rpx;
					color: #2B2B2B;

					image {
						width: 44rpx;
						height: 44rpx;
						margin-right: 6rpx;
					}
				}

				.message-list-header-r {
					display: flex;
					align-items: center;
					font-family: PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #666666;

					.text {

						margin-left: 13rpx;
					}

					image {
						width: 28rpx;
						height: 28rpx;
						margin-left: 8rpx;
					}
				}
			}

			.message-list-content {
				display: flex;

				.message-list-content-avatar {
					width: 100rpx;
					height: 100rpx;
					margin-right: 13rpx;
					border-radius: 50%;
				}

				.message-list-content-r {
					display: flex;
					flex: 1;
					min-width: 0;

					.message-list-content-r-tx {
						flex: 1;
						min-width: 0;

						.message-list-content-r-name {
							font-family: PingFang SC;
							font-weight: 400;
							font-size: 30rpx;
							color: #211C1E;
						}

						.message-list-content-r-tx-subTitle {
							font-family: PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #666666;
							margin-bottom: 16rpx;
						}

						.message-list-content-r-tx-address {
							font-family: PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #666666;
							width: 100%;
							margin-right: 10rpx;
						}
					}

					.message-list-content-r-btns {
						min-width: 130rpx;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						align-items: center;

						.message-list-content-r-btns-agree {
							min-width: 130rpx;
							height: 55rpx;
							background: #12B475;
							border-radius: 28rpx;
							display: flex;
							align-items: center;
							justify-content: center;
							font-family: PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #FFFFFF;
							margin-bottom: 20rpx;
						}

						.message-list-content-r-btns-rej {
							width: 131rpx;
							height: 56rpx;
							border-radius: 28rpx;
							border: 1px solid #C8C8C8;
							display: flex;
							align-items: center;
							justify-content: center;
							font-family: PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #211C1E;
						}
					}
				}
			}

			.message-list-comment {
				height: 170rpx;
				width: 100%;
				position: relative;

				&>image {
					position: absolute;
					top: 0;
					left: 0;
					z-index: 2;
				}

				&>view {
					width: calc(100% - 30rpx);
					position: absolute;
					top: 46rpx;
					left: 15rpx;
					z-index: 3;

					.message-list-comment-item {

						display: flex;
						justify-content: space-between;

						text {
							font-family: PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #999999;
						}
					}

					.message-list-comment-r {
						justify-content: unset;
						border-bottom: 1rpx solid #E5E5E5;
						padding-bottom: 18rpx;
						margin-bottom: 18rpx;
					}
				}
			}
		}
	}

	.list {
		width: 100%;

		.list-item {
			width: 100%;
			margin-bottom: 20rpx;
			background: white;
			display: flex;

			.num {
				width: 60rpx;
				display: flex;
				align-items: center;
				justify-content: flex-end;
				font-size: 34rpx;
				font-weight: bold;
			}

			.cell {
				flex: 1;
				min-width: 0;
			}
		}
	}
</style>